This invention relates to a method for use in a language translating and linking system for translating and linking into a load program a plurality of source programs which include a calling program having calling parameters and a called program having called parameters. More particularly, this invention relates to a method of checking whether or not the calling parameters correspond to the called parameters. This invention relates also to a parameter checking apparatus for use in carrying out the method.
Being written in a particular high-level language, for example, FORTRAN or COBOL, source programs can not be executed directly by a computer. The source programs must therefore be translated and linked into the load program written in machine language. Such a translation and linkage operation is processed by the computer using a previously written language translating and linking program for the particular high-level language. In this manner, the computer should carry out the translation and linkage operation before execution of the source programs. It is usual in the art to refer to the computer carrying out the translation and linkage operation as a language translating and linking system. It is well known in the art that the language translating and linking system comprises a combination of a language translator or a language processor, such as a compiler, and a linkage editor or a linker.
In a conventional language translating and linking system, a conventional language translator or processor only translates or processes the source programs into a plurality of object programs, respectively. A conventional linker only links the object programs into the load program.
One of the source programs may be the calling program in the manner known in the art. The calling program passes control to another of the source programs that is known as the called program. The calling program may have a first number of calling parameters. The called program may have a second number of called parameters.
Under the circumstances, the calling parameters must correspond to the respective called parameters. For this purpose, a check operation has conventionally been made during programming by a programmer whether or not the calling parameters correspond to the called parameters.
It is to be noted that the programmer may make a mistake while carrying out such a check operation during programming. In this event, it becomes impossible to obtain a correct result during execution of the load program into which the source programs programmed by the programmer are translated and linked by the conventional language translating and linking system. Furthermore, it is extremely difficult, costly, and time consuming to search and locate the cause of the mistake and to correct the source programs.